package com.heima.article.job;

import com.heima.article.service.HotArticleService;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * //任务定时调度
 * @author lzq
 * @data 2023/5/12 19:54
 */
@Component
public class ArticleXxlJob {

    @Autowired
    private HotArticleService hotArticleService;
    @XxlJob("HotArticleJob")
    public void hotArticleJob(){

        //调用热点任务
        hotArticleService.computeHotArticle();
    }
}
